package cn.backpackerxl.service.impl;

import cn.backpackerxl.dao.AdminDao;
import cn.backpackerxl.dao.impl.AdminDaoImpl;
import cn.backpackerxl.entity.Admin;
import cn.backpackerxl.service.AdminService;

/**
 * @author: backpackerxl
 * @create: 2021/12/8
 * @filename: AdminServiceImpl
 **/
public class AdminServiceImpl implements AdminService {
    private AdminDao adminDao = new AdminDaoImpl();
    @Override
    public Admin findByEmail(String email) {
        return adminDao.findByEmail(email);
    }

    @Override
    public Admin findByPhone(String phone) {
        return adminDao.findByPhone(phone);
    }

    @Override
    public int addAdmin(Admin admin) {
        return adminDao.addAdmin(admin);
    }
}
